import styles from './index.less';
import { useState } from 'react';
import PageDataCollect from './data_collect.tsx';
import PageReport from './report.tsx';

const Game = () => {
    const [message, send_message] = useState('');

    let page = <PageDataCollect send_message={send_message}></PageDataCollect>; // same as message 'show_data_collect'

    if (message === 'show_report') {
        page = <PageReport send_message={send_message}></PageReport>;
    }

    return <div className={styles.framework}>{page}</div>;
};

export default Game;
